add support of lambdas to get_signature#36
Open
nevion wants to merge 2 commits intoboostorg:developfrom
Open
Conversation
stefanseefeld
pushed a commit
to stefanseefeld/boost.python
that referenced
this pull request
Oct 4, 2016
SCons change to build a static lib for Windows
stefanseefeld
pushed a commit
to stefanseefeld/boost.python
that referenced
this pull request
Oct 8, 2016
SCons change to build a static lib for Windows
8ccdcff to
3ace4a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
see #34
This does not entirely add support for lambda's, but does make it work for get_signature
Presently there is this error (in detail::invoke) when passing a lambda :
https://gist.github.com/nevion/bb90bb9a9b0f7071dbf2
I'm not sure how to proceed with this and will wait for some insights.
It also depends on a type trait that is better off in the type_traits or function_types libraries, and while it looks good it is hard to know if it works in every situation though should always suffice for lambdas - so there may be some justification for keeping it local, at least in the near term.
Also: in ripping out all the macros for pre c++11 support, I probably broke something for older C++03 or lower. But given how hard they are to understand and the pain of not using C++11 with boost.... I'm not sure I really would want to go down the road of trying to support those compilers. On the other hand, I ended up, to my knowledge, not using any C++11 with a potential exception of forwarding with boost::forward. All the sub-libraries used already deal with the gory details. I also did it in such a way that it was drop in switchable, maybe unnecessarily.